package cn.ylhx.venue.background.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.ylhx.venue.background.entity.Background;
import cn.ylhx.venue.background.service.BackgroundService;
import cn.ylhx.venue.common.web.JsonResult;
import cn.ylhx.venue.common.web.PageObject;
import cn.ylhx.venue.system.entity.User;

@Controller
@RequestMapping("/background")
public class BackgroundController {
	@Resource
	private BackgroundService backgroundService;
	@RequestMapping("/listUI")
	public String listUI(){
		return "background/background_list";
		
	}
	/**查询场馆详细信息列表*/
@RequestMapping("/findObjects")
@ResponseBody
public JsonResult doFindObjects(Background background,PageObject pageObject){
	
	Map<String, Object> map = backgroundService.findObjects(background,pageObject);
	return new JsonResult(map);
	
}
/**
 * 启用/禁用
 */
@RequestMapping("changeValid")
@ResponseBody
public JsonResult changeValid(Background background){
	backgroundService.changeState(background);
	return new JsonResult();
}
}
